<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script src="${pageContext.request.contextPath}/dwz/js/dwz.regional.zh.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/dwz/js/dwz.validate.method.js" type="text/javascript"></script>
<div class="pageContent">
	<form action="notice_add.action"
		class="pageForm required-validate"
		onsubmit="return validateCallback(this, navTabAjaxDone);"
		method="post">
		<div class="pageFormContent nowrap" layoutH="56">
			<dl>
				<dt>
					<label>类型：</label>
				</dt>
				<dd>
					<select name="type" class="required combox" id="type"
					ref="subclass" refUrl="notice_getSubclass.action?noticeType={value}">
						<option value="">---请选择---</option>
						<option value="1">系统通知</option>
						<option value="2">代办事项</option>
						<option value="3">系统提醒</option>
					</select>
				</dd>
			</dl>
			<dl>
				<dt>
					<label>子类：</label>
				</dt>
				<dd>
					<select name="subclass" class="required combox" id="subclass">
						<option value="">---请选择---</option>
					</select>
				</dd>
			</dl>
			<dl>
				<dt>
					<label>接收人：</label>
				</dt>
				<dd>
				<input type="radio" name="recUser" id="ru_all" class="required" value="all" onclick="tocheck()"/>全部
				<input type="radio" name="recUser" id="ru_dept" class="required" value="dept" onclick="tocheck()"/>部门
				<input type="radio" name="recUser" id="ru_person" class="required" value="person" onclick="tocheck()"/>个人 
				<div id="all_checked" style="display:none;">
					<input type="hidden" name="ruserone" value=""/>
				</div>
				
				<div id="dept_checked" style="display:none;">
							<select name="rusertwo" class="combox">
								<option value="">---请选择---</option>
								<c:forEach items="${departmentList}" var="dept">
									<option value="${dept.deptCode}">${dept.deptName}</option>
								</c:forEach>
							</select>
				</div>
				
				<div id="person_checked" style="display:none;">
					<select name="not_dept" id="not_dept" class="combox"
					ref="not_recUser" refUrl="notice_getInsideUserByDept.action?deptCode={value}">
							<option value="">---请选择---</option>
							<c:forEach items="${departmentList}" var="dept">
								<option value="${dept.deptCode}">${dept.deptName}</option>
							</c:forEach>
					</select>
					
					<select name="ruserthree" id="not_recUser"
							class="combox">
							<option value="">---请选择---</option>
					</select>
				</div>
				</dd>
			</dl>
			<dl>
				<dt>
					<label>标题：</label>
				</dt>
				<dd>
					<input name="title" class="required" type="text" size="40px"
						maxlength="100"  />
				</dd>
			</dl>
			<dl>
				<dt>
					<label>内容：</label>
				</dt>
				<dd>
					<textarea class="editor required" name="content" rows="8" cols="100"  maxlength="500"
								upImgUrl="notice_imgUpload.action" upImgExt="jpg,jpeg,gif,png" tools="simple"
								></textarea>
				</dd>
			</dl>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">保存</button>
						</div>
					</div></li>
				<li>
					<div class="button">
						<div class="buttonContent">
							<button type="button" class="close">取消</button>
						</div>
					</div>
				</li>
			</ul>
		</div>
		<%-- <input type="hidden" value="${csrfToken}" name="CSRFToken"> --%>
	</form>
</div>
<script type="text/javascript">
	function tocheck(){
		
		if($("#ru_all").attr("checked")){
			$("#all_checked").show(); 
			$("#dept_checked").hide();
			$("#person_checked").hide();
		}
		if($("#ru_dept").attr("checked")){
			$("#all_checked").hide(); 
			$("#dept_checked").show();
			$("#person_checked").hide();
		}
		if($("#ru_person").attr("checked")){
			$("#all_checked").hide(); 
			$("#dept_checked").hide();
			$("#person_checked").show();
		}
	}
</script>
